<!--${_TPL.put('titles',(thread['subject'], mtag['tagname'], mtag['title'], '话题'))}-->
<!--$embed{"header.htm"}-->

<h2 class="title">
	<img src="image/app/mtag.gif"><a href="space.html?do=mtag&id=${mtag['fieldid']}">${mtag['title']}</a> -
	<a href="space.html?do=mtag&tagid=${mtag['tagid']}">${mtag['tagname']}</a>
</h2>

<div class="tabs_header">
	<a href="cp.html?ac=share&type=thread&id=${thread['tid']}" id="a_share" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="a_share">分享</a>
	<div class="r_option">
		<!--$if{isPerm2ManageThread}--><a href="cp.html?ac=common&op=manage&idtype=thread&id=${thread['tid']}" id="a_manage" onclick="ajaxmenu(event, this.id, 99999)">管理</a><span class="pipe">|</span><!--$end-->
		<a href="cp.html?ac=common&op=report&idtype=thread&id=${thread['tid']}" id="a_report" onclick="ajaxmenu(event, this.id, 99999,'' , -1)">举报</a><span class="pipe">|</span>
	</div>
	<ul class="tabs">
		<li><a href="space.html?do=mtag&tagid=${thread['tagid']}&view=list"><span>返回讨论区</span></a></li>
		<!--$if{&com.heaven.web.utils.IF.empty(mtag['ismember']) && mtag['joinperm'] < 2}-->
		<li class="null"><a href="cp.html?ac=mtag&op=join&tagid=${mtag['tagid']}" id="mtag_join_${mtag['tagid']}" onclick="ajaxmenu(event, this.id, 99999)">加入该群组</a></li>	
		<!--$elseif{ mtag['allowpost']}-->
		<li class="null"><a href="cp.html?ac=thread&tagid=${mtag['tagid']}">发起新话题</a></li>
		<!--$end-->
	</ul>
</div>

<div id="div_post">
	<div class="board">
		<!--$if{threadContent}-->
		<div id="post_${threadContent['pid']}_li">
			<ul class="line_list">
				<li>
				<table width="100%">
				<tr>
					<td width="70" valign="top">
						<div class="avatar48">
						<a href="space.html?uid=${thread['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(thread['uid'],'small')}-->" alt="${_SN[thread['uid']]}" class="avatar" /></a>
						</div>
					</td>
					<td>
						<div class="title">
							<div class="r_option">
								<!--$if{ thread['uid']==_SGLOBAL['supe_uid']}-->
								<a href="cp.html?ac=thread&op=edit&pid=${threadContent['pid']}&tagid=${thread['tagid']}">编辑</a>
								<!--$end-->
								<!--$if{ mtag['grade']>=8 || thread['uid']==_SGLOBAL['supe_uid']}-->
								<a href="cp.html?ac=thread&op=delete&pid=${threadContent['pid']}&tagid=${thread['tagid']}" id="p_${threadContent['pid']}_delete" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
								<!--$end-->
								<!--$if{ mtag['allowpost']}--><a href="#postform">回复</a><!--$end--> 
								<!--$if{ mtag['grade']>=8}-->
									<!--$if{ thread['displayorder']}-->
									<a href="cp.html?ac=thread&op=top&tagid=${thread['tagid']}&tid=${thread['tid']}&cancel" id="t_${thread['tid']}_top" onclick="ajaxmenu(event, this.id, 2000)">取消置顶</a>
									<!--$else-->
									<a href="cp.html?ac=thread&op=top&tagid=${thread['tagid']}&tid=${thread['tid']}" id="t_${thread['tid']}_top" onclick="ajaxmenu(event, this.id, 2000)">置顶</a>
									<!--$end-->
									<!--$if{ thread['digest']}-->
									<a href="cp.html?ac=thread&op=digest&tagid=${thread['tagid']}&tid=${thread['tid']}&cancel" id="t_${thread['tid']}_digest" onclick="ajaxmenu(event, this.id, 2000)">取消精华</a>
									<!--$else-->
									<a href="cp.html?ac=thread&op=digest&tagid=${thread['tagid']}&tid=${thread['tid']}" id="t_${thread['tid']}_digest" onclick="ajaxmenu(event, this.id, 2000)">精华</a>
									<!--$end-->
								<!--$end-->
							</div>
							<h1>${thread['subject']}</h1>
							<a href="space.html?uid=${thread['uid']}">${_SN[thread['uid']]}</a>
							<span class="time"><!--${&com.heaven.web.utils.Common.sgmdate('yyyy-MM-dd HH:mm',thread['dateline'],true)}--></span>
						</div>
						<div class="detail" id="detail_0">
							<!--$if{ _SGLOBAL['ad']['rightside']}-->
							<div style="float: right; padding:5px;"><!--{ad/rightside}--></div>
							<!--$end-->
							${threadContent['message']}
							
							<!--$if{ threadContent['pic']}--><div><a href="${threadContent['pic']}" target="_blank"><img src="${threadContent['pic']}" alt="" class="resizeimg" /></a></div><!--$end-->
						</div>
					</td>
				</tr>
				</table>
				</li>
			</ul>
		</div>
		<!--$end-->

		<div id="post_ul">
		
			<!--$if{ pid}-->
			<div class="notice">
				当前只显示与你操作相关的单个帖子，<a href="space.html?uid=${thread['uid']}&do=thread&id=${thread['tid']}">点击此处查看全部回帖</a>
			</div>
			<!--$end-->

			<!--$for{value:list}-->
			<!--$embed{"space_post_li.htm"}-->
			<!--$end-->
		</div>
		
		<div class="page">${multi}</div>
		
		<!--$if{ mtag['allowpost']}-->
		
		<div class="quickpost" id="postform">
			<form method="post" action="cp.html?ac=thread" class="quickpost" id="quickpostform_${thread['tid']}" name="quickpostform_${thread['tid']}">
				<table>
					<tr>
						<td>
							<a href="###" id="quickpost" onclick="showFace(this.id, 'message');"><img src="image/facelist.gif" align="absmiddle" /></a><br>
							<textarea id="message" name="message" onkeydown="ctrlEnter(event, 'postsubmit_btn');" col="50" rows="6" style="width: 450px; height: 6em;"></textarea>
						</td>
					</tr>
					<tr>
						<td>插入图片</td>
					</tr>
					<tbody id="quickpostimg">
						<tr>
							<td>
								<input type="text" name="pics[]" onfocus="if(this.value == 'http://')this.value='';" onblur="if(this.value=='')this.value='http://'" value="http://" class="t_input" size="55" />&nbsp;
								<a href="javascript:;" onclick="insertWebImg(this.previousSibling.previousSibling)">插入</a> &nbsp;
								<a href="javascript:;" onclick="delRow(this, 'quickpostimg')">删除</a>
							</td>
						</tr>
					</tbody>
					<tr>
						<td><a href="javascript:;" onclick="copyRow('quickpostimg')">+增加图片</a> <span class="gray">只支持 .jpg、.gif、.png为结尾的URL地址</span></td>
					</tr>
					<tr>
						<td>
							<input type="hidden" name="tid" value="${thread['tid']}" />
							<input type="hidden" name="postsubmit" value="true" />
							<input type="button" id="postsubmit_btn" name="postsubmit_btn" value="回复" class="submit" onclick="ajaxpost('quickpostform_${thread['tid']}', 'post_status', 'post_add')" />
							<div id="post_status"></div>
						</td>
					</tr>
				</table>
				<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
			</form>
		</div>
		<!--$else-->
		<div class="c_form">
		<!--$if{ mtag['grade']==-1}-->
			您现在被群主禁言，不能参与讨论。
		<!--$else-->
			你还不是该群组正式成员，不能参与讨论。
			<!--$if{ mtag['grade']==-9}-->
			<a href="cp.html?ac=mtag&op=join&tagid=${mtag['tagid']}" id="_tag_join_${mtag['tagid']}" onclick="ajaxmenu(event, this.id, 99999)">现在就加入</a>。
			<!--$end-->
		<!--$end-->
		</div>
		<!--$end-->
	</div>			
</div>

<script type="text/javascript">
	resizeImg('div_post','600');
</script>
					
<!--$embed{"footer.htm"}-->